import DailyTaskSystem from "../system/DailyTaskSystem";
import Util from "../../../StartAb/Util";
import { ITask } from "./ITask";

export class TaskLogin extends ITask {
    constructor() {
        super();
        this._rewardCoin = 20;
        // let daydiff = Util.getDayDiff(new Date(DailyTaskSystem.lastLoginRewardTimeStamp), new Date());
        // if(daydiff > 0)
        //     this._status = TaskStatus.Completed;
        // else if(daydiff == 0)
        //     this._status = TaskStatus.GetRewarded;
    }

    didGetReward(): void {
        DailyTaskSystem.updateLoginRewardTime();
    }

    description() {
        return Util.getMulLangText("dailyLogin")
    }

    isDone(): boolean {
        return true;
    }

    progressString(): string {
        return "1/1"
    }

    progressPercent(): number {
        return 1
    }
}